package util;

public class Conversions {

    
    /**
     * Convert from Radians to Degrees
     * @param radians
     * @return input in degrees
     */
    public static double radToDeg(double radians){
        return radians * (180 / Math.PI);
    }
    
    /**
     * Convert from Degrees to Radians
     * @param degrees
     * @return input in radians
     */
    public static double degToRad(double degrees){
        return degrees * (Math.PI / 180);
    }
    
    public static double truncate(double value, int precision) {
    	return (Math.floor(value*Math.pow(10, precision))/Math.pow(10, precision));
    }
}
